﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Dos.ORM.Cache" />
<meta name="generator" content="DocsBuilder" />
<title>Cache 类 (Dos.ORM)</title>
<script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../styles/zebra.css" />
<script type="text/javascript" src="../../scripts/accordion.js"></script>
</head><body>
<h1>Cache 类</h1>
  <div id="familySection">
        System.Object<br />
        &nbsp;&nbsp;<b>Dos.ORM.Cache</b><br />
  </div>
<div id="summarySection">
  
简单缓存处理类

</div>
<div id="namespaceSection"> <strong>命名空间：</strong><a href="../ORM/namespace-summary.html">Dos.ORM</a><br />
  <strong>程序集：</strong><span>Dos.ORM（在 Dos.ORM.dll 中）</span> </div>
<div id="syntaxSection" class="syntaxSection"> <pre class="code"><span class="keyword">public</span> <span class="keyword">class</span> <span class="type">Cache</span></pre> </div>
  <a id="constructorTableToggle" onclick="ExpandCollapse(document.getElementById('constructorTableSection'));ToggleSwitch(this.childNodes[0].childNodes[0]);"><h2><img alt="" title="折叠" src="../../images/collapse.png" />构造函数</h2></a>
  <div id="constructorTableSection">
    <table id="constructorTable" class="memberTable" cellspacing="0" cellpadding="0" border="0">
      <tr>
        <th></th>
        <th>名称</th>
        <th>说明</th>
      </tr>
        <tr id="#ctor">
          <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
          </td>
          <td>
            <a href="##ctor" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">Cache()</a>
          </td>
          <td>
            
          </td>
        </tr>
        <tr style="display:none;">
          <td colspan="3">
            <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                <h3>Cache() 构造函数 </h3>
                <div></div>
                <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> Cache()</pre></div>
            </div>
          </td>
        </tr>
        <tr id="#ctor(System.Int32)">
          <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
          </td>
          <td>
            <a href="##ctor(System.Int32)" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">Cache(Int32)</a>
          </td>
          <td>
            
设置过期时间

          </td>
        </tr>
        <tr style="display:none;">
          <td colspan="3">
            <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                <h3>Cache(Int32) 构造函数 </h3>
                <div>
设置过期时间
</div>
                <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> Cache(<span class="keyword">int</span> timeOut)</pre></div>
                  <h5>参数</h5>
                  <dl class="paramsSection">
                      <dt>timeOut</dt>
                      <dd>
                        类型：<span class="type">System.Int32</span><br />
                        
                      </dd>
                  </dl>
            </div>
          </td>
        </tr>
    </table>
  </div>
    <a id="fieldTableToggle" onclick="ExpandCollapse(document.getElementById('fieldTableSection'));ToggleSwitch(this.childNodes[0].childNodes[0]);"><h2><img alt="" title="折叠" src="../../images/collapse.png" />字段</h2></a>
    <div id="fieldTableSection">
      <table id="fieldTable" class="memberTable" cellspacing="0" cellpadding="0" border="0">
        <tr>
          <th></th>
          <th>名称</th>
          <th>说明</th>
        </tr>
          <tr id="Default">
            <td><img alt="" title="公共字段" src="../../images/pubfield.gif" /><img alt="" title="静态成员" src="../../images/static.gif" />
            </td>
            <td><a href="#Default" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">Default</a>
            </td>
            <td>
              
默认cache实例

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
                <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.Default 字段 </h3>
                  <div>
                    
默认cache实例

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">static</span> <span class="type">Cache</span> Default</pre></div>
                  <h5>字段值</h5>
                  类型：<span class="type"><a href="Cache.html">Dos.ORM.Cache</a></span>
                </div>
              </td>
            </tr>
      </table>
    </div>
  <a id="propertyTableToggle" onclick="ExpandCollapse(document.getElementById('propertyTableSection'));ToggleSwitch(this.childNodes[0].childNodes[0]);"><h2><img alt="" title="折叠" src="../../images/collapse.png" />属性</h2></a>
  <div id="propertyTableSection">
    <table id="propertyTable" class="memberTable" cellspacing="0" cellpadding="0" border="0">
      <tr>
        <th></th>
        <th>名称</th>
        <th>说明</th>
      </tr>
          <tr id="TimeOut">
            <td><img alt="" title="公共属性" src="../../images/pubproperty.gif" />
            </td>
            <td><a href="#TimeOut" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">TimeOut</a>
            </td>
            <td>
              
time out (seconds)   

<![CDATA[if timeout <=0,the cache expiration time is maxvalue]]>
            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
                <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.TimeOut 属性 </h3>
                  <div>
                    
time out (seconds)   

<![CDATA[if timeout <=0,the cache expiration time is maxvalue]]>
                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">int</span> TimeOut { <span class="keyword">get</span>; <span class="keyword">set</span>; }</pre></div>
                  <h5>属性值</h5>
                  <div class="returnsSection">
                    类型：<span class="type">System.Int32</span><br />
                    
                  </div>
                </div>
              </td>
            </tr>
    </table>
  </div>
  <a id="methodTableToggle" onclick="ExpandCollapse(document.getElementById('methodTableSection'));ToggleSwitch(this.childNodes[0].childNodes[0]);"><h2><img alt="" title="折叠" src="../../images/collapse.png" />方法</h2></a>
  <div id="methodTableSection">
    <table id="methodTable" class="memberTable" cellspacing="0" cellpadding="0" border="0">
      <tr>
        <th></th>
        <th>名称</th>
        <th>说明</th>
      </tr>
          <tr id="AddCache(System.String,System.Object)">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#AddCache(System.String,System.Object)" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">AddCache(String, Object)</a>
            </td>
            <td>
              
添加缓存 (绝对有效期)

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.AddCache(String, Object) 方法 </h3>
                  <div>
                    
添加缓存 (绝对有效期)

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> AddCache(<span class="keyword">string</span> cacheKey, <span class="keyword">object</span> cacheValue)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          缓存键值
                        </dd>
                        <dt>cacheValue</dt>
                        <dd>
                          类型：<span class="type">System.Object</span><br />
                          缓存内容
                        </dd>
                    </dl>
                </div>
              </td>
            </tr>
          <tr id="AddCache(System.String,System.Object,System.Int32)">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#AddCache(System.String,System.Object,System.Int32)" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">AddCache(String, Object, Int32)</a>
            </td>
            <td>
              
添加缓存 (绝对有效期)

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.AddCache(String, Object, Int32) 方法 </h3>
                  <div>
                    
添加缓存 (绝对有效期)

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> AddCache(<span class="keyword">string</span> cacheKey, <span class="keyword">object</span> cacheValue, <span class="keyword">int</span> timeout)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          缓存键值
                        </dd>
                        <dt>cacheValue</dt>
                        <dd>
                          类型：<span class="type">System.Object</span><br />
                          缓存内容
                        </dd>
                        <dt>timeout</dt>
                        <dd>
                          类型：<span class="type">System.Int32</span><br />
                          绝对有效期（单位: 秒）
                        </dd>
                    </dl>
                </div>
              </td>
            </tr>
          <tr id="AddCacheDependency(System.String,System.Object,System.Int32,System.Web.Caching.CacheDependency)">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#AddCacheDependency(System.String,System.Object,System.Int32,System.Web.Caching.CacheDependency)" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">AddCacheDependency(String, Object, Int32, CacheDependency)</a>
            </td>
            <td>
              
添加缓存 (文件依赖)

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.AddCacheDependency(String, Object, Int32, CacheDependency) 方法 </h3>
                  <div>
                    
添加缓存 (文件依赖)

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> AddCacheDependency(<span class="keyword">string</span> cacheKey, <span class="keyword">object</span> cacheValue, <span class="keyword">int</span> timeout, <span class="type">CacheDependency</span> dep)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          缓存键值
                        </dd>
                        <dt>cacheValue</dt>
                        <dd>
                          类型：<span class="type">System.Object</span><br />
                          缓存内容
                        </dd>
                        <dt>timeout</dt>
                        <dd>
                          类型：<span class="type">System.Int32</span><br />
                          绝对过期时间 （单位：秒）
                        </dd>
                        <dt>dep</dt>
                        <dd>
                          类型：<span class="type">System.Web.Caching.CacheDependency</span><br />
                          缓存依赖
                        </dd>
                    </dl>
                </div>
              </td>
            </tr>
          <tr id="AddCacheFilesDependency(System.String,System.Object,System.String[])">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#AddCacheFilesDependency(System.String,System.Object,System.String[])" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">AddCacheFilesDependency(String, Object, String[])</a>
            </td>
            <td>
              
添加缓存 (文件依赖)

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.AddCacheFilesDependency(String, Object, String[]) 方法 </h3>
                  <div>
                    
添加缓存 (文件依赖)

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> AddCacheFilesDependency(<span class="keyword">string</span> cacheKey, <span class="keyword">object</span> cacheValue, <span class="keyword">params</span> <span class="keyword">string</span>[] filenames)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          缓存键值
                        </dd>
                        <dt>cacheValue</dt>
                        <dd>
                          类型：<span class="type">System.Object</span><br />
                          缓存内容
                        </dd>
                        <dt>filenames</dt>
                        <dd>
                          类型：<span class="type">System.String[]</span><br />
                          缓存依赖的文件或目录
                        </dd>
                    </dl>
                </div>
              </td>
            </tr>
          <tr id="AddCacheKeysDependency(System.String,System.Object,System.String[])">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#AddCacheKeysDependency(System.String,System.Object,System.String[])" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">AddCacheKeysDependency(String, Object, String[])</a>
            </td>
            <td>
              
添加缓存 (一组键值依赖)

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.AddCacheKeysDependency(String, Object, String[]) 方法 </h3>
                  <div>
                    
添加缓存 (一组键值依赖)

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> AddCacheKeysDependency(<span class="keyword">string</span> cacheKey, <span class="keyword">object</span> cacheValue, <span class="keyword">string</span>[] cachekeys)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          缓存键值
                        </dd>
                        <dt>cacheValue</dt>
                        <dd>
                          类型：<span class="type">System.Object</span><br />
                          缓存内容
                        </dd>
                        <dt>cachekeys</dt>
                        <dd>
                          类型：<span class="type">System.String[]</span><br />
                          一组缓存键，此改变缓存也失效
                        </dd>
                    </dl>
                </div>
              </td>
            </tr>
          <tr id="AddCacheSlidingExpiration(System.String,System.Object)">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#AddCacheSlidingExpiration(System.String,System.Object)" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">AddCacheSlidingExpiration(String, Object)</a>
            </td>
            <td>
              
添加缓存 (相对有效期)

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.AddCacheSlidingExpiration(String, Object) 方法 </h3>
                  <div>
                    
添加缓存 (相对有效期)

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> AddCacheSlidingExpiration(<span class="keyword">string</span> cacheKey, <span class="keyword">object</span> cacheValue)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          缓存键值
                        </dd>
                        <dt>cacheValue</dt>
                        <dd>
                          类型：<span class="type">System.Object</span><br />
                          缓存内容
                        </dd>
                    </dl>
                </div>
              </td>
            </tr>
          <tr id="AddCacheSlidingExpiration(System.String,System.Object,System.Int32)">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#AddCacheSlidingExpiration(System.String,System.Object,System.Int32)" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">AddCacheSlidingExpiration(String, Object, Int32)</a>
            </td>
            <td>
              
添加缓存 (相对有效期)

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.AddCacheSlidingExpiration(String, Object, Int32) 方法 </h3>
                  <div>
                    
添加缓存 (相对有效期)

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> AddCacheSlidingExpiration(<span class="keyword">string</span> cacheKey, <span class="keyword">object</span> cacheValue, <span class="keyword">int</span> timeout)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          缓存键值
                        </dd>
                        <dt>cacheValue</dt>
                        <dd>
                          类型：<span class="type">System.Object</span><br />
                          缓存内容
                        </dd>
                        <dt>timeout</dt>
                        <dd>
                          类型：<span class="type">System.Int32</span><br />
                          相对过期时间 (单位: 秒)
                        </dd>
                    </dl>
                </div>
              </td>
            </tr>
          <tr id="ClearAll">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#ClearAll" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">ClearAll</a>
            </td>
            <td>
              
清空所有缓存

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.ClearAll 方法 </h3>
                  <div>
                    
清空所有缓存

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> ClearAll()</pre></div>
                </div>
              </td>
            </tr>
          <tr id="GetCache(System.String)">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#GetCache(System.String)" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">GetCache(String)</a>
            </td>
            <td>
              
获取缓存

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.GetCache(String) 方法 </h3>
                  <div>
                    
获取缓存

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">object</span> GetCache(<span class="keyword">string</span> cacheKey)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          对象的关键字
                        </dd>
                    </dl>
                    <h5>返回值</h5>
                    <div class="returnsSection">
                      类型：<span class="type">System.Object</span><br />
                      
                    </div>
                </div>
              </td>
            </tr>
          <tr id="GetCacheKeys">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#GetCacheKeys" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">GetCacheKeys</a>
            </td>
            <td>
              
返回缓存键值列表

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.GetCacheKeys 方法 </h3>
                  <div>
                    
返回缓存键值列表

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="type">List</span>&lt;<span class="keyword">string</span>&gt; GetCacheKeys()</pre></div>
                    <h5>返回值</h5>
                    <div class="returnsSection">
                      类型：<span class="type">System.Collections.Generic.List&lt;System.String&gt;</span><br />
                      
                    </div>
                </div>
              </td>
            </tr>
          <tr id="GetCount">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#GetCount" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">GetCount</a>
            </td>
            <td>
              
获取缓存数量

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.GetCount 方法 </h3>
                  <div>
                    
获取缓存数量

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">int</span> GetCount()</pre></div>
                    <h5>返回值</h5>
                    <div class="returnsSection">
                      类型：<span class="type">System.Int32</span><br />
                      
                    </div>
                </div>
              </td>
            </tr>
          <tr id="RemoveCache(System.String)">
            <td><img alt="" title="公共方法" src="../../images/pubmethod.gif" />
            </td>
            <td><a href="#RemoveCache(System.String)" onclick="ExpandCollapse(this.parentNode.parentNode.nextSibling);return false;">RemoveCache(String)</a>
            </td>
            <td>
              
删除缓存

            </td>
          </tr>
            <tr style="display:none;">
              <td colspan="3">
          	    <div class="memberSection" ondblclick="if(GetSelection()=='')ExpandCollapse(this.parentNode.parentNode);">
                  <h3>Cache.RemoveCache(String) 方法 </h3>
                  <div>
                    
删除缓存

                  </div>
                  <div class="syntaxSection"><pre class="code"><span class="keyword">public</span> <span class="keyword">void</span> RemoveCache(<span class="keyword">string</span> cacheKey)</pre></div>
                    <h5>参数</h5>
                    <dl class="paramsSection">
                        <dt>cacheKey</dt>
                        <dd>
                          类型：<span class="type">System.String</span><br />
                          缓存键值
                        </dd>
                    </dl>
                </div>
              </td>
            </tr>
    </table>
  </div>
<br />
<div class="DocsBuilder">Generated by <span><a href="http://www.ITdos.com" target="_blank">www.ITdos.com</a></span></div>
</body>
</html>
